<!DOCTYPE html>
<html lang="en">
<head>
    [#include "/customer/include/static.htm"]
    <link href="${path}/resources/css/member/main.css" rel="stylesheet" type="text/css" />
    <link href="${path}/resources/css/member/forgot.css" rel="stylesheet" type="text/css" />
    <link href="${path}/resources/plug/layui/css/layui.css" rel="stylesheet" type="text/css"/>
    <script src="${path}/resources/plug/layui/layui.js" type="text/javascript"></script>
</head>

<body>
<!--头部-->
[#include "/customer/include/header.ftl"]
<div class="g-bgwrap">
    <div class="g-subnav-tit">
        <h1><b>你所在的位置：</b><span><a href="/index">我的账户</a></span><i>&gt;</i><a href="javascript:void(0);">找回交易密码</a></h1>
    </div>
    <div class="forgot-cont">
        <div class="forgot-tit"><b>找回交易密码</b></div>
        <div class="forgot-index">
            <div class="forgot-index-tit">请输入您绑定账号的手机号码</div>
            <div id="ultab-cont">
                <div class="div-box" style="display:block;">
                    <div class="forgot-mobile">
                        <form class="layui-form" >
                            <ul>
                                <li class="li-inp-lay li-w100">
                                    <strong class="i-mobile"></strong>
                                    <input type="text" name="mobile" required lay-verify="phone" class="inp-txt1 inp-mob" placeholder="请输入注册时的手机号码">
                                </li>
                                <li class="li-inp-lay li-w320">
                                    <strong class="i-yzm"></strong>
                                    <input type="text" name="captcha" class="inp-txt1 inp-yzm" required lay-verify="required" placeholder="请输入验证码"  >
                                </li>
                                <li class="li-inp-lay li-w130">
                                    <img src="${path}/common/random" id="code_img" width="100" height="35"
                                         onclick="this.src = '${path}/common/random?' + Math.random();" title="点击刷新验证码"
                                         style="top: 18px;margin-left:15px;" />
                                </li>
                            </ul>
                            <div class="forgot-error" style="display:none;" id="error"></div>
                            <button class="forgot-btn" lay-submit lay-filter="MainForm">下一步</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<form  >

</form>
<script type="text/javascript">
    layui.use(['form','layer'], function(){
        var form = layui.form(), $=layui.jquery,layer = layui.layer;
        form.on('submit(MainForm)', function(data){
            var index = layer.load();
            ajax({
                url: "${path}/member/forget",
                type: "POST",
                dataType: "json",
                cache: false,
                data: data.field,
                success: function(result) {
                    layer.close(index);
                    if(result && result.type && result.type == "success"){
                        location.href= "${path}/member/forget2?token="+result.content;
                    }else{
                        layer.msg(result.content);
                        $("#code_img").attr("src", "${path}/common/random?t="+new Date().getTime());
                    }
                },
                complete:function(){
                    layer.close(index);
                }
            });

            return false;
        });
    });
</script>
[#include "/customer/include/footer.ftl"]
</body>
</html>